* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 20px;
    max-width: 900px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.score-board {
    display: flex;
    gap: 30px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.game-controls {
    display: flex;
    gap: 10px;
}

.game-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.game-controls button:hover {
    background: #0056b3;
}

#gameCanvas {
    border: 2px solid #333;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
}

.game-instructions {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.game-instructions h3 {
    color: #333;
    margin-bottom: 10px;
}

.game-instructions ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-instructions li {
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.modal-content p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
}

#restart-game-btn {
    padding: 12px 30px;
    font-size: 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

#restart-game-btn:hover {
    background: #1e7e34;
}

@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .game-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-instructions ul {
        flex-direction: column;
        align-items: center;
    }
}
